跳到主要内容

数学符号及其 JavaScript 对应符号列表

SymbolNameSinceExampleJavaScript
Horizontal bar for division~1300ba​<br>a / b<br>
+Plus sign1360a+b<br>a + b<br>
-Minus sign1489a−b<br>a - b<br>
Radical symbol1525x​<br>Math.sqrt(x)<br>
(...)Parentheses1544(a+b)<br>(a + b)<br>
=Equals1557a=b<br>// equality<br>a == b<br><br>// assignment<br>a = b<br>
.Decimal separator15931.75<br>1.75<br>
×Multiplication sign1618a×b<br>a * b<br>
±Plus–minus sign1628a±2<br>[a - 2, a + 2]<br>
ⁿ√Radical symbol for nth root1629na​<br>Math.pow(a, 1/n)<br>
<Strict inequality less-than1631a<b<br>a < b<br>
>Strict inequality greater-than1631a>b<br>a > b<br>
Superscript notation1636ab<br>a ** b<br>
xUse of the letter x for an independent variable or unknown value1637x<br>// declare<br>let x = 0<br><br>// usage<br>x<br><br>// re-assign<br>x = 2<br>
%Percent sign1650n%<br>n / 100<br>
Infinity sign1655<br>Infinity<br>
÷Division sign1659a÷b<br>a / b<br>
Unstrict inequality less-than sign1670a≤b<br>a <= b<br>
Unstrict inequality greater-than sign1670a≥b<br>a >= b<br>
dDifferential sign1675m=dxdy​<br>m = (y2 - y1) / (x2 - x1)<br>
Integral sign1675∫18​f(x)⋅dx<br>let dx = 1/8 // step size<br>let sum = 0<br><br>for (let x=1; x<=8; x += dx) {<br> sum += f(x) * dx<br>}<br>
:Colon for division1684a:b<br>a / b<br>
·Middle dot for multiplication1698a⋅b<br>a * b<br>
Division slash1718a/b<br>a / b<br>
Inequality signunknowna=b<br>a != b<br>
x'Prime symbol for derivative1748x′<br>// TODO<br>
ΣSummation symbol1755i=0∑10​i<br>let sum = 0<br><br>for(let i=0; i<10; i++) {<br> sum += i<br>}<br>
Proportionality sign1768yx​αba​<br>x/y == a/b<br>
Partial differential sign1770<br>// TODO<br>
Identity sign1801a≡b<br>a === b<br>
[x]Integral part (aka floor)1808[x]<br>Math.floor(x)<br>
!Factorial1808n!<br>function factorial(n) {<br> if (n == 0) return 1<br><br> return n * factorial(n - 1)<br>}<br>
ΠProduct symbol1812x=2∏4​(x+1)<br>let product = 1<br>let x = 2<br><br>for (let i=0; i<4; i++) {<br> product *= (x + 1)<br>}<br>
Set subset of1817a⊂b<br>let a = new Set(...)<br>let b = new Set(...)<br><br>a.isSubsetOf(b)<br>
Set superset of1817a⊃b<br>let a = new Set(...)<br>let b = new Set(...)<br><br>a.isSupersetOf(b)<br>
|...|Absolute value notation1841∣x∣<br>Math.abs(x)<br>
‖...‖Matrix notation1843∥x∥<br>// TODO<br>
Intersection1888a∩b<br>let a = new Set(...)<br>let b = new Set(...)<br><br>a.intersection(b)<br>
Union1888a∪b<br>let a = new Set(...)<br>let b = new Set(...)<br><br>a.union(b)<br>
Membership sign1894a∈b<br>let a = ...<br>let b = new Set(...)<br><br>b.has(a)<br>
{...}Curly brackets for set notation1895{x,y,z}<br>new Set([x, y, z])<br>
Existential quantifier (there exists)1897(∃x) f(x)<br>let array = [ ... ]<br><br>array.some(x => f(x))<br>
·Dot product1902a⋅b<br>let a = [...]<br>let b = [...]<br>let sum = 0<br><br>assert(a.length == b.length)<br><br>for (let i=0; i<a.length;i++) {<br> sum += a[i] * b[i]<br>}<br>
×Cross product1902a×b<br>let a = [x1, y1, z1]<br>let b = [x2, y2, z2]<br><br>[<br> (a[1] * b[2]) - (a[2] * b[1]),<br> (a[2] * b[0]) - (a[0] * b[2]),<br> (a[0] * b[1]) - (a[1] * b[0])<br>]<br>
Logical disjunction (aka OR)1906a∨b<br>a | b<br>
(...)Matrix round bracket notation1909(ax​by​cz​)<br>[<br> [a, b, c],<br> [x, y, z]<br>]<br>
[...]Matrix square bracket notation1909[ax​by​cz​]<br>[<br> [a, b, c],<br> [x, y, z]<br>]<br>
Universal quantifier (for all)1935(∀x) f(x)<br>let array = [ ... ]<br><br>array.every(x => f(x))<br>
Empty set sign1939<br>new Set()<br>
⌊x⌋Greatest integer ≤ x (aka floor)1962⌊x⌋<br>Math.floor(x)<br>
⌈x⌉Smallest integer ≥ x (aka ceiling)1962⌈x⌉<br>Math.ceil(x)<br>

Created by Joshua Nussbaum